/*
 *    Copyright (c) 2018-2025, nart All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: nart
 */

package com.nai365.nart.blockchain.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.nai365.nart.blockchain.dto.VerifyUserDto;
import com.nai365.nart.blockchain.dto.VerifyUserResDto;
import com.nai365.nart.blockchain.entity.Account;
import com.nai365.nart.common.core.util.R;

import java.math.BigDecimal;

/**
 * 账户
 *
 * @author pigx code generator
 * @date 2022-06-23 15:31:52
 */
public interface AccountService extends IService<Account> {

	//public void createAccount() throws IOException;

	//public String VerifyUser(VerifyUserDto verifyUserDto);

	R<VerifyUserResDto> verifyUser(VerifyUserDto verifyUserDto);

	/**
	 * 充值业务费
	 *
	 * @param address 链地址
	 * @param money   金额
	 */
	void rechargeBusiness(String address, BigDecimal money) throws Exception;

	/**
	 * 充值能量值
	 *
	 * @param address 链地址
	 * @param money   金额
	 */
	void rechargeGas(String address, BigDecimal money) throws Exception;

	/**
	 * 根据区块链地址查询账户
	 * @param address 区块链地址
	 * @return 账户
	 */
	Account findByAddress(String address);


}
